package com.sny.service;

import com.sny.constants.ResultForAmis;
import com.sny.vo.param.AmisFinishChunkParam;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

public interface IAmisChunkFileService {

    // 用来做分块前的准备工作
    ResultForAmis startChunkApi(String filename, String name, String appId);

    // 用来接收每个分块上传,并将文件进行合并
    ResultForAmis chunkApi(String key, String uploadId, Long partNumber, Long partSize, @RequestParam("file") MultipartFile file, String appId);

    // 分块上传后 合并文件完成上传
    ResultForAmis finishChunkApi(@RequestBody AmisFinishChunkParam param, String appId);
}
